#include "ourhdr.h"
#include "fat32.h"

void initialise_fat32(const char* device){
	struct filsys_fat32 * dosfs;
	printf("Initialising a fat32 filesystem on device: %s:...\n", device);
	dosfs = (struct filsys_fat32 *) malloc (sizeof(struct filsys_fat32));
	if(!dosfs)
		err_sys("malloc error");
	init_struct_fat32(device, dosfs);
	clear_disk(device);
	format_fat32(dosfs);
	pre_allocation_fat32(dosfs);
	free(dosfs);
	printf("Initialisation finished.\n");
	return;
}
